package jsyf.oa.entity.email;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by LT on 2018/6/7.
 */
@Entity
@Table(name = "T_WRT_RECEIVER_COPIERS", schema = "oa", catalog = "")
public class WreportReceiverCopiersEntity extends BaseEntity {

    private String senderUserId;
    private String userId;
    private String userName;
    private Integer type;
    private String wId;
    private String reportDate;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getSenderUserId() {
        return senderUserId;
    }

    public void setSenderUserId(String senderUserId) {
        this.senderUserId = senderUserId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getwId() {
        return wId;
    }

    public void setwId(String wId) {
        this.wId = wId;
    }

    public String getReportDate() {
        return reportDate;
    }

    public void setReportDate(String reportDate) {
        this.reportDate = reportDate;
    }

    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("SENDER_USER_ID", getSenderUserId());
        obj.put("USER_ID", getUserId());
        obj.put("USER_NAME", getUserName());
        obj.put("TYPE", getType());
        obj.put("REPORT_DATE", getReportDate());
        obj.put("W_ID", getwId());


        return obj;
    }

    public JSONObject getJSONObjectId() {
        JSONObject obj = new JSONObject();
        obj.put("id", getId());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_WRT_RECEIVER_COPIERS";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("SENDER_USER_ID", "senderUserId");
        obj.put("USER_ID", "userId");
        obj.put("USER_NAME","userName");
        obj.put("TYPE", "type");
        obj.put("REPORT_DATE", "reportDate");
        obj.put("W_ID","wId");
        return obj;
    }
}
